package org.alanlau.service;

import org.alanlau.dao.TestDIDao;

/**
 * @author alan
 * @version 1.0
 * @date 2020/1/12 0:54
 */
public class TestDIServiceImpl2 implements TestDIService {
    private TestDIDao testDIDao;

    /**
     * 通过setter方法注入依赖
     * @author alan
     * @date 2020/1/12 0:54
     * @param testDIDao
     */
    public void setTestDIDao(TestDIDao testDIDao) {
        this.testDIDao = testDIDao;
    }

    @Override
    public void sayHello() {
        testDIDao.sayHello();
        System.out.println("TestDIService setter方法注入 say: Hello,Study hard!");
    }
}
